<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8" %>
<%String path = request.getContextPath();%>
<%@ taglib uri="/WEB-INF/tld/c.tld" prefix="c" %>
<!DOCTYPE html>
<html lang="zh-CN">
<head>
	<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
	<title>实名认证</title>
	<jsp:include page="../../import.jsp" flush="true" />
	<script type="text/javascript">
		var grid = null;
		var callback = function () {
			grid.reload();
		};
		$(function () {
			initForm();
			initGrid();//注意初始化要在initForm之后,因为在初始化grid的时候需要form参数
			searchBtnEvent();
			clearBtnEvent();
		});

		//清空按钮事件
		function clearBtnEvent(){
			$("#clearBtn").click(function(event) {
				clearLigerForm("searchBar");
			});
		}

		//初始化表单
		function initForm(){
			$("#searchBar").ligerForm();
		}

		//查询按钮事件
		function searchBtnEvent(){
			$("#searchBtn").click(function(event) {
				var form = new liger.get("searchBar");
				var data = form.getData();
				for (name in data){
					grid.setParm(name,data[name]);
				};
				grid.reload();
			});
		}

		//初始化列表
		function initGrid(){
			$("#ligergrid1").ligerGrid({
				url: '<%=path%>/custpay/cmmRealAuth/initCmmRealAuthList.do',
				method : 'get',
				columns: [
					{ display: '手机号', name: 'cardTel', width: 100 , enabledSort:true},
					{ display: '客户姓名', name: 'customerName', width: 100 , enabledSort:true},
					{ display: '证件类型', name: 'certType', minWidth: 100 , enabledSort:true},
					{ display: '证件号码', name: 'certNo', width: 250 , enabledSort:true},
                    { display: '银行卡类型', name: 'cardType', width: 100 , enabledSort:true},
                    { display: '卡号', name: 'cardNo', width: 250 , enabledSort:true},
                    { display: '结果', name: 'signResult', width: 100 , enabledSort:true},
                    { display: '结果描述', name: 'signResultDesc', width: 200 , enabledSort:true},
                    { display: '登录手机号', name: 'phone', width: 100 , enabledSort:true},
                    { display: '创建时间', name: 'crtTm', render:renderDate, width: 150 , enabledSort:true},
				],
				pageSize:10,
				root:'rows',
				record:'total',
				rownumbers: true,
				hideLoadButton : true,
				width: '100%',
				height:'100%',
				heightDiff:-2
			});
			grid = liger.get("ligergrid1");
			grid.setHeight(100);
		}

		//格式化时间
		function renderDate(rowdata, index, value){
			var dateStr = "";
			if(null != value){
				var date = new Date(value);
				dateStr = DateUtils.formatDate(date, DateUtils.YYYY_MM_DDHHMMSS);
			}
			return dateStr;
		}
	</script>
</head>
<body class="iframeBody">
<div class="Wrapper">
<div class="searchArea">
    <form id="searchBar">
			<div class="fieldset1 tabel_col clearFix">
				<div class="fieldBox col_33">
					<div class="label">手机号</div>
					<div class="field">
						<input name="phone" id="phone" type="text" class="ui-textbox" value="">
					</div>
				</div>
				<div class="fieldBox col_33">
					<div class="label">姓名</div>
					<div class="field">
						<input name="customerName" id="customerName" type="text" class="ui-textbox" value="">
					</div>
				</div>
				<div class="fieldBox col_33">
					<div class="label">状态</div>
					<div class="field">
						<input name="signResult" id="signResult" type="text" class="ui-textbox" value="">
					</div>
				</div>
			</div>
            <div class="clearFix"></div>
            <div class="btnsBox">
               <span id="searchBtn" class="sq-button sq-button-hasicon"><i class="sqBtnIco_1"></i>查询</span>
               <span id="clearBtn" class="sq-button sq-button-hasicon"><i class="sqBtnIco_19"></i>清空</span>
               <input id="resetBtn" type="reset" value="重置" class="l-button l-button-reset Hide"/>
            </div>
        </form>
    </div>
	<div id="ligergrid1" class="sq-grid"></div>
</div>
</body>
</html>